package cn.gailvlun.gll.presentation.hotel.drawer

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentStatePagerAdapter
import cn.gailvlun.gll.R
import cn.gailvlun.gll.presentation.base.App


class HotelSharePagerAdapter : FragmentStatePagerAdapter {

    override fun getItem(position: Int): Fragment {
        when (position) {
            0 -> return HotelShareTextFragment()
            1 -> return HotelShareAudioFragment()
        }
        return HotelShareTextFragment()
    }

    override fun getCount() = 2

    private val stringarray = App.getInstance().resources.getStringArray(R.array.hotel_drawer_tab_title)

    override fun getPageTitle(position: Int) = stringarray[position]

    constructor(fm: FragmentManager?) : super(fm)
}